package com.molichuxing.services.property;

/**
 * 
 * @author liyg 驾驶证审核状态枚举类
 *
 */
public enum DrivingLicenseVerifyStatusEnum {

	/**
	 * 未审核
	 */
	UNREVISED(0, "未审核"),
	
	/**
	 * 审核通过
	 */
	APPROVE(1, "审核通过"),

	/**
	 * 驳回
	 */
	REJECT(2, "驳回");

	

	int value;
	String name;

	DrivingLicenseVerifyStatusEnum(int value, String name) {
		this.value = value;
		this.name = name;
	}

	public int getValue() {
		return value;
	}

	public String getName() {
		return name;
	}


	/**
	 * 通过value获取枚举的name
	 * 
	 * @param value
	 * @return
	 */
	public static String getName(int value) {
		DrivingLicenseVerifyStatusEnum enumerate = getEnum(value);
		return enumerate == null ? null : enumerate.getName();
	}

	/**
	 * 通过value获取枚举
	 * 
	 * @param value
	 * @return
	 */
	public static DrivingLicenseVerifyStatusEnum getEnum(int value) {
		for (DrivingLicenseVerifyStatusEnum enumerate : DrivingLicenseVerifyStatusEnum.values()) {
			if (enumerate.getValue() == value) {
				return enumerate;
			}
		}
		return null;
	}
}
